package com.java5_11_2;
/*
* 测试类
* */
public class AnimalDemo {
    public static void main(String[] args) {
        // 创建操作对象
        AnimalOperator ao = new AnimalOperator();
        Animal a = new Cat();
        ao.useAnimal(a);

        Animal a2 = ao.getAnimal();
        a2.eat();
    }
}
